{template 'common/header'}
<ul class="nav nav-tabs">
    <li {if !$status}class="active"{/if}><a href="{php echo $this->createWebUrl('share',array('pid'=>$pid))}">推广记录</a></li>
    <li {if $status}class="active"{/if}><a href="{php echo $this->createWebUrl('share',array('pid'=>$pid,'status'=>1))}">黑名单</a></li>
</ul>
<style>
th{
	text-align: center !important;
}

td{
	text-align: center !important;
	white-space: normal !important;
	word-break: break-all !important;
}
</style>
<script type="text/javascript">
require(['jquery', 'util'], function($, util){
	$(function(){
		util.clip($('#needCopy')[0], $('#needCopy').attr('data-url'));
	});
});
</script>
<div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="{php echo $this->createWebUrl('share',array('pid'=>$pid,'status'=>$status))}" method="post" class="form-horizontal">
                <div class="form-group">
                   <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label" style="width: 200px;">昵称或UID</label>
                    <div class="col-sm-2 col-lg-3">
	                    <input type="text" name="name" value="{$name}" class="form-control" style="display: inline-block;">
                    </div>
                   <button class="btn btn-default">搜索</button>
                </div>
            </form>
        </div>
</div>
<div class="panel panel-default">

	<div class="panel-body" style="text-align: center;">

        <table class="table table-hover">

            <thead class="navbar-inner">
                <tr>
                	<th>用户UID</th>
                    <th>昵称</th>		
                    <th>头像</th>	
                    <th>地区</th>
                    {if $type==3}<th>邀请码</th>{/if}
                    <th>1级推广</th>
                    <th>2级推广</th>
					<th>关注时间</th>
					<th>生成时间</th>
					<th style="width: 200px;">操作</th>
                </tr>
            </thead>

            <tbody id="table_content">

                {loop $list $l}
                <tr>
                	<td>{$l['openid']}</td>
                    <td>{$l['nickname']}</td>
                    <td><img src="{$l['avatar']}" style="width: 80px;height: 80px;"></td>
                    <td>{$l['province']}<br>{$l['city']}</td>
                    {if $type==3}<td>{$l['ticketid']}</td>{/if}
                    <td><a href="{php echo $this->createWebUrl('share',array('pid'=>$pid,'sid'=>$l['openid']))}">{$l['l1']}</a></td>
                    <td><a href="{php echo $this->createWebUrl('share',array('pid'=>$pid,'cid'=>$l['openid']))}">{$l['l2']}</a></td>
                    <td>{php echo date('Y-m-d H:i:s',$l['follow'])}</td>
                    <td>{php echo date('Y-m-d H:i:s',$l['createtime'])}</td>
                    <td>
                    	{if $status}
                    	<a onclick="return confirm('确定恢复吗？')" href='{php echo $this->createWebUrl("status",array("pid"=>$pid,"sid"=>$l["id"],"status"=>1))}' class='btn btn-info btn-sm'>恢复</a>
                    	{else}
                    	<a onclick="return confirm('确定拉黑吗？')" style="background-color: black;" href='{php echo $this->createWebUrl("status",array("pid"=>$pid,"sid"=>$l["id"]))}' class='btn btn-info btn-sm'>拉黑</a>
                    	{/if}
                    	<a onclick="return confirm('删除后将无法恢复，确定删除吗？')" href='{php echo $this->createWebUrl("delete",array("pid"=>$pid,"sid"=>$l["id"],"status"=>$status,"sceneid"=>$l["sceneid"]))}' class='btn btn-danger btn-sm'>删除</a>
                    	

                    </td>
                </tr>
                {/loop}

            </tbody>

        </table>

        {$pager}

    </div>

</div>
{template 'common/footer'}